#include <vld.h>

#include <stdio.h>
#include "ErrorUtility.h"
#include "SocketServer.h"
#include "HTTPServer.h"
#include <exception>

int main(int argc, char* argv[])
{
	try
	{
		HTTPServer server(80);
		server.Start();
		printf("Press Enter to quit...\n\n");
		getchar();
	}
	catch(const std::exception& e)
	{
		ErrorUtility::Instance().Error(e.what());
	}
	catch(...)
	{
		ErrorUtility::Instance().Error("Unexpected error.");
	}
	ErrorUtility::Instance().Info("Application terminated.");
	return 0;
}